<#assign ctx="${rc.contextPath}">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title></title>
		<style type="text/css">
			body {
				margin-left: 0px;
				margin-top: 0px;
				background-image: url('${ctx}/images/seach_4.gif');
			}
		</style>
		<link href="${ctx}/css/common.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="${ctx}/js/jquery-1.4.4.min.js"></script>
		<style>
			a:link{color:#F08334;	text-decoration: none;}
		</style>
	</head>

<body>
<form method="post" action="${ctx}/nrgl/doc_list.htm" id="query">
	<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height=25 id=location ><div align="left">
      	<img src="../images/location_arrow.gif" width="8" height="11" align="absmiddle"> 您的位置：通知/公告管理 &gt;&gt; 公告管理</div></td>
    </tr>
    <TR>
      <TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      	所属部门&nbsp;&nbsp;
      	<SELECT name="group_id" id="group_id" size="1" style="width:210px">
      		<option value=""> 请选择 </option>
		   <#if groupList??>
		   		<#list groupList as group>
	   				<option value="${group.group_id!""}" <#if group.group_id == group_id!"">selected</#if>> ${group.group_name} </option>
				</#list>
		   </#if>
		 </SELECT>
		 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		 类型 <SELECT name="doc_type" id="doc_type" size="1" style="width:100px">
		<option value="">请选择</option>
		<option value="0" <#if doc_type!"" == "0">selected</#if>> 通知 </option>
		<option value="1" <#if doc_type!"" == "1">selected</#if>> 公告 </option>
	  </SELECT>
    </TD>
    <tr><td>&nbsp;</td></tr>
    <TR>
      <TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      	标题&nbsp;&nbsp;
      	<INPUT type="text" name="title" id="title" class="input-text" style="width:300px" size="60">
      	&nbsp;&nbsp;
      	<input name="Submit2" type="button" class="input-button" value="查 询" onclick="query()">
      	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      	<input name="Submit2" type="button" class="input-button" value="新增公告" onclick="javascript:gotodoc()">
      	</TD>
    </TR>
    <tr><td>&nbsp;</td></tr>
</table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" id="list"  bgcolor="#FFFFFF">
            <tr>
			  <TH align="center" width="60"> 操作 </TH>   
			  <TH align="center" width="60"> 所属部门 </TH>            
              <TH align="center" width="20"> 类型</TH>
              <TH align="center" width="100"> 标题 </TH>
              <TH align="center" width="150"> 内容 </TH>
			  <TH align="center" width="50"> 创建者 </TH>
			  <TH align="center" width="40">创建时间</TH>
			  <TH align="center" width="50">修改者</TH>
			  <TH align="center" width="40">修改时间</TH>
              </tr>
                <#if page??>
                  <#list page.elements as doc>
                <tr id="${doc.doc_id!""}">
                <TD align="center">
					<a href="${ctx}/nrgl/editdoc/${doc.doc_id!""}.htm" style="color:#F08334; text-decoration: none;">修改</a>
					<a href="${ctx}/nrgl/deletedoc/${doc.doc_id!""}.htm" onclick="deletedoc('${doc.doc_id}');" style="color:#F08334; text-decoration: none;">删除</a>
				 </TD>
                 <TD align="center">${doc.group_name!""}</TD>
                 <TD align="center">
                  <#if doc.doc_type??>
                  	<#if doc.doc_type == "0">
                  			通知
                  		<#elseif doc.doc_type == "1">
                  			公告
                  	</#if>
                  </#if>
              </TD>  
				  <TD align="center" title=${doc.title!""}>
				  <#if doc.title?? && (doc.title)?length &gt; 20>
                        ${doc.title[0..16]}..
                    <#else>
                        ${doc.title!""}
                  </#if></TD>
                  <TD align="center" title=${doc.content!""}>
                  <#if doc.content?? && (doc.content)?length &gt; 18>
                        ${doc.content[0..15]}...
                    <#else>
                        ${doc.content!""}
                  </#if></TD>
                  <TD align="center">${doc.create_user!""}</TD>
				  <TD align="center">${doc.create_date!""}</TD>
				  <TD align="center">${doc.modify_user!""}</TD>
                  <TD align="center">${doc.modify_date!""}</TD>
                  </#list></#if>
              </table>

          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td id="page">
              <div align="right">
             <#if page.elements??>
                    <@ui.pager page=page action="${ctx}/nrgl/doc_list.htm">

                    </@ui.pager>
              </#if>
              </div>
              </td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>　</td>
            </tr>
          </table>
          <input type="hidden" name="docId">
     </form>
</body>
</html>
<script>
	function query(){
		$('#query').submit();
	}
	
	function gotodoc(){
		window.location.href="${ctx}/nrgl/gotodoc.htm";
	}
	
	function deletedoc(id) {
		if (confirm('确定要删除这条记录吗？')) {
		    window.location.href="${ctx}/nrgl/deletedoc.htm?id="+id;
		}
	}
</script>
